//
//  KRequesetLinkUrl.m
//  Leave
//
//  Created by Administrator on 13-3-25.
//  Copyright (c) 2013年 FH. All rights reserved.
//

#import "KRequesetLinkUrl.h"

@implementation KRequesetLinkUrl

+(NSString *)getUrlByKey:(NSUInteger)key{
    NSString *serverName = [[NSString alloc] initWithFormat:@"%@/",HOST];
    switch (key) {
            
        case LOGIN:{
            /**
             * 0 登录
             */
            return [serverName stringByAppendingString:@"?d=we&m=login"];
            break;
        }
        case CONTACTS:{
            /**
             * 1 通讯录
             */
            return [serverName stringByAppendingString:@"?d=we&m=index&a=userlist"];
            break;
        }
        case EDITPASS:{
            /**
             *2 修改密码
             */
            return [serverName stringByAppendingString:@"?m=index&d=we&a=editpass"];
            break;
        }
        case CHANGE_COMPANY:{
            /**
             *3 更换公司
             */
            return [serverName stringByAppendingString:@"?m=index&d=we&a=company&uid="];
            break;
        }
        case LOGOUT:{
            /**
             *4 退出
             */
            return [serverName stringByAppendingString:@"api.php?m=login&a=loginexit&adminid="];
            break;
        }
        case CHATLIST:{
            /**
             *5 聊天
             */
            return [serverName stringByAppendingString:@"?d=we&m=index&a=chatlist&uid="];
            break;
        }
        case ZIDINGYI:{
            /**
             *6 自定义
             */
            return [serverName stringByAppendingString:@"?m=index&d=we&a=zidingyi"];
            break;
        }
        case Interface_api_sign_init:{
            /**
             *7 打卡初始化
             **/
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case Interface_api_sign_clock:{
            /**
             *8 打卡
             **/
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case Interface_api_apply_home_btn:{
            /**
             *9 打卡
             **/
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case mine_info:{
            /**
             *10 我的
             **/
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case app_check_update:{
            /**
             *11 更新
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case KQCOUNT:{
            /**
             *12 考勤统计
             */
            return [serverName stringByAppendingString:@"?m=ying&d=we&a=kqcount"];
            break;
        }
        case HOMNE_INDEX:{
            /**
             *13 首页
             */
            return [serverName stringByAppendingString:@"?m=index&d=we"];
            break;
        }
        case get_oss_token:{
            /**
             *14 token oss
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
            
        case HISTORY_TOTAL:{
            /**
             *15  获取聊天badge
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
            
        case SIGN_CALENDAR:{
            /**
             *16  考勤统计-补卡
             */
            return [serverName stringByAppendingString:@"?d=we&m=ying&a=calendar"];
            break;
        }
        case CONTACTS_LIST:{
            /**
             *17 通讯录列表
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case CONTACTS_USER_INFO:{
            /**
             *18 联系人详情
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case CONTACTS_SEARCH:{
            /**
             *19 搜索
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case USER_CHAT:{
            /**
             *20 用户聊天接口
             */
            return [serverName stringByAppendingString:@"?m=chat&d=we&type=user&uid="];
            break;
        }
        case SEND_CODE:{
            /**
             *21 发送验证码
             */
            return [serverName stringByAppendingString:@"api.php?openkey=513fb82e1e54251bb2c0bf95786d136a&m=openChangePassword&a=getMobile"];
            break;
        }
        case FORGET_PWD:{
            /**
             *22 找回密码
             */
            return [serverName stringByAppendingString:@"api.php?openkey=513fb82e1e54251bb2c0bf95786d136a&m=openChangePassword&a=checkCode"];
            break;
        }
        case DAILY_SUBMIT:{
            /**
             *23提交日报
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case DAILY_DETAIL:{
            /**
             *24日报详情
             */
            return [serverName stringByAppendingString:@"api.php"];
            break;
        }
        case CLOCK_CALENDER_BUKA:{ 
            /**
             *25补卡
             */
            return [serverName stringByAppendingString:@"?a=lum&m=input&d=flow&num=kqerr&show=we"];
            break;
        }
        default:
       
            return nil;
            break;
    }
}

+(NSString *)getUrlByValue:(NSString *)value{
    NSString *serverName = [[NSString alloc] initWithFormat:@"%@/",HOST];
    return [serverName stringByAppendingString:value];
}

+(NSString *)getZcUrlByValue:(NSString *)value{
    NSString *serverName = [[NSString alloc] initWithFormat:@"%@/",ZCHOST];
    return [serverName stringByAppendingString:value];
}

@end

